//
//  ZQSlider.m
//  ssssss
//
//  Created by 李志权 on 16/5/13.
//  Copyright © 2016年 李志权. All rights reserved.
//

#import "ZQSlider.h"

@implementation ZQSlider
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    [self initSubView];
    return self;
}
- (void)initSubView
{
    self.minimumTrackTintColor= [UIColor clearColor];
    self.maximumTrackTintColor = [UIColor clearColor];
    self.minimumBackground = [[UIView alloc]initWithFrame:CGRectMake(0, 20, self.frame.size.width, 10)];
    [self.minimumBackground setShearRound:5 masksToBounds:YES borderWidth:0 borderColor:nil];
    self.minimumBackground.backgroundColor = [UIColor grayColor];
    [self addSubview:self.minimumBackground];
    self.maximumBackground = [[UIView alloc]initWithFrame:CGRectMake(0, 20, 0, 10)];
    [self.maximumBackground setShearRound:5 masksToBounds:YES borderWidth:0 borderColor:nil];
    self.maximumBackground.backgroundColor = [UIColor greenColor];
    [self addSubview:self.maximumBackground];
    
    [self setThumbImage:[UIImage imageNamed:@"Button"] forState:UIControlStateNormal];//设置滑块的背景图片
}
  
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
